<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/WEB-INF/facelets/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:f="http://java.sun.com/jsf/core">
    
    <ui:define name="content">
       
            <h:form id="loginForm" prependId="false">
                <p:panel header="Already a Customer? - Login">
                    <p:spacer height="40"/>
                   
                        <h:panelGrid id="loginPanelGrid" columns="2" >
                            <h:outputLabel value="Email: "/>
                            <p:inputText value="#{LoginBackingBean.loginName}"/>
                            <h:outputLabel value="Password: " />      
                            <p:password feedback="false" minLength="1" value="#{LoginBackingBean.password}"/>
                        </h:panelGrid>
                    
                    
                    <p:commandButton ajax="false" value="Login" actionListener="#{LoginControllerBean.logIn}" action="#{LoginControllerBean.navigate}" update="msgs"/><br/>
                    <p:messages id="msgs" showDetail="true"/>
                    
                    <p:commandLink ajax="false" value="Forgot Your Password?"
                                   actionListener="#{LoginControllerBean.forgotPassword}" action="#{LoginControllerBean.navigateToForgotPassword}"/>

                </p:panel>
                <p:panel header="Not a Customer? - Register" style="text-align: center">
                    <p:spacer height="40"/>
                    <p:commandLink ajax="false" value="Register now!" action="#{LoginControllerBean.navigateToRegister()}"/>
                    <p:spacer height="40"/>
                </p:panel>

            </h:form>
    </ui:define>
</ui:composition>